package com.b511.swpu.cementbackend.util.convert.lengthAndWidth;

import com.b511.swpu.cementbackend.util.convert.Context;
import com.b511.swpu.cementbackend.util.convert.Convert;
import org.springframework.util.StringUtils;

public class LengthAndWidthContext extends Context {

    @Override
    protected LengthAndWidthConvert createConvert(String unitName) {
        switch (unitName) {
            case "MM":
                return new MeterToMillimeterConvert();
            case "CM":
                return new MeterToCentimeterConvert();
            case "DM":
                return new MeterToDecimeterConvert();
            default:
                return null;
        }
    }
}
